package cn.seecoder.courselearning.controller.vip;


import cn.seecoder.courselearning.dto.vip.VipChargeDTO;
import cn.seecoder.courselearning.service.vip.VipService;
import cn.seecoder.courselearning.vo.ResultVO;
import cn.seecoder.courselearning.vo.vip.VipInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public class VipController {

    @Autowired
    VipService vipService;

    @GetMapping("/vipPrice")
    public ResultVO<List<VipInfoVO>> getVipPriceInfo(){
        return vipService.getVipPriceInfo();
    }

    @PostMapping("/vipGet")
    public ResultVO chargeVip(@RequestBody VipChargeDTO vipChargeDTO){
        return vipService.getVip(vipChargeDTO);
    }
}
